﻿using CIS.Common.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CIS.Common.Dtos.ClientDtos
{
    public class ProceeProgramClientDto
    {
        public ProceeProgramClientDto()
        {
            PPIDRecipeMappingsClient = new List<PPIDMappingClientDto>();
        }
        public string? PPID { get; set; }

        public PPIDState PPChangedInfo { get; set; }

        public string? OperationName { get; set; }

        public bool MixRunFlag { get; set; }

        public List<PPIDMappingClientDto>? PPIDRecipeMappingsClient { get; set; }

        public string? RecipeNo1 { get; set; }
        public string? RecipeNo2 { get; set; }

        public void GetRecipeNo()
        {
            foreach(var item in PPIDRecipeMappingsClient)
            { 
                if(item.SourceId == "3AFS12-USC")
                    RecipeNo1 = "RecipeNo:" + item.RecipeNo.ToString();
                if (item.SourceId == "3AFS12-SPU")
                    RecipeNo2 = "RecipeNo:" + item.RecipeNo.ToString();
            }
        }
    }
}
